package dbms.symbol;

import java.util.HashMap;

public class Symbol {
	
	public  String name;
	public  static HashMap<String, Symbol> dict = new HashMap<String, Symbol>();
	
	public Symbol(String s) {
		name = s;
	}
	
	public String getName() {
		return name;
	}
	
	public static Symbol symbol(String n) {
		Symbol s = (Symbol)dict.get(n);
		if (s == null) {
			s = new Symbol(n);
			dict.put(n, s);
			return dict.get(n);
		}
		else return s;
	}
}